﻿<UserControl x:Class="CC.VolumeMixer.Controls.VolumeBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Controls="clr-namespace:CC.VolumeMixer.Controls" mc:Ignorable="d" 
             d:DesignHeight="50" d:DesignWidth="500"  Foreground="#FF5AC119" Height="50" Width="500">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="80"></ColumnDefinition>
            <ColumnDefinition Width="340*"></ColumnDefinition>
            <ColumnDefinition Width="80"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <Controls:VolumeIcon x:Name="VolumeIcon" HorizontalAlignment="Right" Margin="10,0">
            <Controls:VolumeIcon.CacheMode>
                <BitmapCache/>
            </Controls:VolumeIcon.CacheMode>
        </Controls:VolumeIcon>
        
        <ProgressBar Name="ProgressBarVolume" Grid.Column="1" Height="22" IsHitTestVisible="False" IsTabStop="False" Margin="10,0" Value="50" VerticalAlignment="Center" Background="Transparent">
            <ProgressBar.CacheMode>
                <BitmapCache/>
            </ProgressBar.CacheMode>
            
            <ProgressBar.Effect>
                <DropShadowEffect x:Name="DropShadowProgressBar" ShadowDepth="3"></DropShadowEffect>
            </ProgressBar.Effect>

            <ProgressBar.Template>
                <ControlTemplate>
                    <StackPanel>
                        <Border Name="PART_Track" BorderBrush="Black" BorderThickness=".5" CornerRadius="3" Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}">
                            <Rectangle Name="PART_Indicator" Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" HorizontalAlignment="Left" VerticalAlignment="Stretch"/>
                        </Border>
                    </StackPanel>
                </ControlTemplate>
            </ProgressBar.Template>

        </ProgressBar>

        <TextBlock Name="TextBlockVolume" Grid.Column="2" FontWeight="Bold" FontSize="32" HorizontalAlignment="Left" Margin="10,0" Padding="0">
            <TextBlock.CacheMode>
                <BitmapCache EnableClearType="True"></BitmapCache>
            </TextBlock.CacheMode>
            
            <TextBlock.Effect>
                <DropShadowEffect x:Name="DropShadowTextBlock" ShadowDepth="3"></DropShadowEffect>
            </TextBlock.Effect>
            100
        </TextBlock>

    </Grid>
</UserControl>
